package com.zbkj.common.constants;

/**
 * Redis常量类
 */
public class RedisConstants {

    /**
     * 用户注册信息缓存Key
     */
    public static final String USER_REGISTER_KEY = "USER:REGISTER:";

    /**
     * 用户登token redis存储前缀
     */
    public static final String REDIS_TOKEN_USER_NORMAL_KEY = "TOKEN:USER:NORMAL:";
    public static final String REDIS_TOKEN_USER_SHOP_MANAGER_KEY = "TOKEN:USER:SHOPMANAGER:";
    public static final String REDIS_TOKEN_USER_DELIVERY_PERSONNEL_KEY = "TOKEN:USER:DELIVERYPERSONNEL:";
    /**
     * 用户登token WEB存储前缀
     */
    public static final String WEB_TOKEN_USER_NORMAL_KEY = "user:normal:";
    public static final String WEB_TOKEN_USER_SHOP_MANAGER_KEY = "user:shopmanager:";
    public static final String WEB_TOKEN_USER_DELIVERY_PERSONNEL_KEY = "user:deliverypersonnel:";
    public static final String MERCHANT = "merchant";

    public static final String FRONT_USER_TOKEN_SET_KEY = "FRONT:USER:TOKEN:{}";
    public static final String FRONT_MERCHANT_USER_TOKEN_SET_KEY = "FRONT:MERCHANT:USER:TOKEN:{}";

    /**
     * 商品浏览量（每日）
     */
    public static final String PRO_PAGE_VIEW_KEY = "statistics:product:page_view:";
    public static final String PRO_PRO_PAGE_VIEW_KEY = "statistics:product:pro_page_view:{}:{}";

    /**
     * 商品加购量（每日）
     */
    public static final String PRO_ADD_CART_KEY = "statistics:product:add_cart:";
    public static final String PRO_PRO_ADD_CART_KEY = "statistics:product:pro_add_cart:{}:{}";

    /**
     * 商户访客量
     */
    public static final String MERCHANT_VISITORS_KEY = "statistics:merchant:visitors:{}:{}";

    /**
     * 移动端Token过期时间 3小时
     */
    public static final long TOKEN_EXPRESS_MINUTES = (60 * 24);

    /**
     * 验证码redis key前缀
     */
    public static final String VALIDATE_REDIS_KEY_PREFIX = "validate_code_";

    /**
     * 预下单Key
     */
    public static final String USER_READY_ORDER_KEY = "user_order:";

    /**
     * 系统菜单缓存Key
     */
    public static final String MENU_CACHE_LIST_KEY = "menuList";
    /**
     * 平台端系统菜单缓存Key
     */
    public static final String PLATFORM_MENU_CACHE_LIST_KEY = "platformMenuList";
    /**
     * 商户端系统菜单缓存Key
     */
    public static final String MERCHANT_MENU_CACHE_LIST_KEY = "merchantMenuList";

    /**
     * 商品分类缓存Key
     */
    public static final String PRODUCT_CATEGORY_CACHE_LIST_KEY = "productCategoryList";
    /**
     * 商户端商品分类缓存Key
     */
    public static final String PRODUCT_CATEGORY_CACHE_MERCHANT_LIST_KEY = "productCategoryMerchantList";
    /**
     * 平台端商品专题分类缓存Key
     */
    public static final String SPECIAL_TOPIC_CATEGORY_CACHE_LIST_KEY = "specialTopicCategoryList";
    /**
     * 商户端商品专题分类缓存Key
     */
    public static final String SPECIAL_TOPIC_CATEGORY_CACHE_MERCHANT_LIST_KEY = "specialTopicCategoryMerchantList";
    /**
     * 平台端ai试衣分类缓存Key
     */
    public static final String AI_FITTING_CATEGORY_CACHE_LIST_KEY = "aiFittingCategoryList";
    /**
     * 商户端ai试衣分类缓存Key
     */
    public static final String AI_FITTING_CATEGORY_CACHE_MERCHANT_LIST_KEY = "aiFittingCategoryMerchantList";
    /**
     * 商品全部品牌缓存列表Key
     */
    public static final String PRODUCT_ALL_BRAND_LIST_KEY = "productBrandAllList";

    /**
     * 商户商品分类缓存Key
     */
    public static final String STORE_PRODUCT_CATEGORY_CACHE_LIST_KEY = "store:product:category:list:{}";

    /**
     * 物流公司缓存Key
     */
    public static final String EXPRESS_CACHE_LIST_KEY = "expressList";

    /**
     * 城市数据 redis key
     */
    public static final String CITY_LIST = "city_list";
    /**
     * 城市tree redis key
     */
    public static final String CITY_LIST_TREE = "city_list_tree";
    /**
     * 城市区域tree redis key
     */
    public static final String CITY_REGION_LIST_TREE = "city_region_list_tree";

    /**
     * 快递信息缓存
     */
    public static final String LOGISTICS_KEY = "logistics_";

    /**
     * 微信公众号模板消息列表 Key
     */
    public static final String WE_CHAT_MESSAGE_KEY_PUBLIC = "we_chat_public_message_list";

    /**
     * 微信小程序订阅通知列表 Key
     */
    public static final String WE_CHAT_MESSAGE_KEY_PROGRAM = "we_chat_program_message_list";

    /**
     * 秒杀商品库存缓存key
     **/
    public static final String SECKILL_PRODUCT_INFO_KEY = "seckill_product_info:{}";

    /**
     * 秒杀商品库存缓存key
     **/
    public static final String SECKILL_PRODUCT_QUOTA_KEY = "seckill_product_quota:{}";

    /**
     * 秒杀商品规格SKU库存缓存key
     **/
    public static final String SECKILL_PRODUCT_SKU_QUOTA_KEY = "seckill_product_sku_quota:{}";

    /**
     * 微信小程序运力缓存Key
     **/
    public static final String WECHAT_MINI_DELIVERY_KEY = "wechat_delivery";

    /**
     * 管理后台账号登录错误数量keu
     **/
    public static final String ADMIN_ACCOUNT_LOGIN_ERROR_NUM_KEY = "admin:account:login:error:{}";

    /**
     * 拼团业务用到的创建订单前存储，支付后判断记录的 key
     **/
    public static final String PINTUAN_ORDER_RECORD_KEY = "pintuan_record:{}";

    /**
     * 配送员经纬度key
     **/
    public static final String LOCATION = "location:";

    /**
     * 配送车辆航向值 0~360
     **/
    public static final String GPS_DIRECTION_VALUE = "gps_direction_value:";

    /**
     * 速度 (单位:km/h)
     **/
    public static final String SPEED = "speed:";

    /**
     * 途狐管车相关参数
     **/
    public static final String TU_HU_PARAM = "tu_hu_param:";

    /**
     * ai换衣服务token
     **/
    public static final String AI_TOKEN = "ai:token";


    /**
     * 普通用户netty连接通道
     **/
    public static final String ORDINARY_USERS_CHANNEL = "ordinary_users:channel:";

    /**
     * 客服netty连接通道
     **/
    public static final String CUSTOMER_SERVICE_CHANNEL = "customer_service:channel:";

    /**
     * netty用户和通道关系
     **/
    public static final String RELATION_CHANNEL_USER = "channel:user";
    /**
     * netty用户和通道关系
     **/
    public static final String RELATION_USER_CHANNEL = "user:channel";

    /**
     * 用作netty发送消息的队列
     */
    public static final String CHANNEL_MESSAGE_QUEUE_KEY = "message:queue:channel";

    /**
     * 会话分配模式平均分配索引
     */
    public static final String CONVERSATION_ASSIGN_MODE_AVG_INDEX_KEY = "assistant:conversation:mode:avg:index";

    /**
     * 客服设置
     */
    public static final String ASSISTANT_SETTING_KEY = "assistant:setting:";

    /**
     * 普通用户netty在线状态
     **/
    public static final String ORDINARY_USERS_STATUS = "ordinary_users:status:";

    /**
     * 客服netty在线状态
     **/
    public static final String CUSTOMER_SERVICE_STATUS = "customer_service:status:";

    /**
     * 在线
     **/
    public static final String ONLINE = "online";

    /**
     * 离线
     **/
    public static final String OFFLINE = "offline";

    /**
     * 客服消息未读数
     **/
    public static final String CUSTOMER_SERVICE_NOT_READ_NUMBER = "customer_service:not_read_number:{}:{}:";

    /**
     * 普通用户消息未读数
     **/
    public static final String ORDINARY_USERS_NOT_READ_NUMBER = "ordinary_users:not_read_number:";

    /**
     * 途狐access_token
     **/
    public static final String TU_HU_ACCESS_TOKEN = "tu_hu:access_token";
}
